import axios from '../utils/request'

export default {
    //  获取详情数据 
    getDetails(data = {}) {
        return axios({
            url: 'api/product/getDetails',
            method: 'post',
            data: data
        })
    },
    // 获取轮播图数据 
    getDetailsPicture(data = {}) {
        return axios({
            url: 'api/product/getDetailsPicture',
            method: 'post',
            data: data
        })
    },
    // 添加收藏
    addCollect(data = {}) {
        return axios({
            url: 'api/user/collect/addCollect',
            method: 'post',
            data: data
        })
    },
    // 加入购物车 /user/shoppingCart/addShoppingCart
    addShoppingCart(data = {}) {
        return axios({
            url: 'api/user/shoppingCart/addShoppingCart',
            method: 'post',
            data: data
        })
    },
    // 获取收藏数据  /user/collect/getCollect
    collect(data = {}) {
        return axios({
            url: 'api/user/collect/getCollect',
            method: 'post',
            data: data
        })
    },
    // 删除收藏  /user/collect/deleteCollect
    deleteCollect(data = {}) {
        return axios({
            url: 'api/user/collect/deleteCollect',
            method: 'post',
            data: data
        })
    },
}